package com.aliang.shopping.model.po;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 订单信息表
 * @TableName orders_info
 */
@TableName(value ="orders_info")
@Data
public class OrdersInfo implements Serializable {
    /**
     * 订单信息id
     */
    @TableId(value = "id")
    private Long id;

    /**
     * 支付编号
     */
    @TableField(value = "pay_no")
    private Long payNo;

    /**
     * 商家Id
     */
    @TableField(value = "business_id")
    private Long businessId;

    /**
     * 用户Id
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 地址Id
     */
    @TableField(value = "address_id")
    private Long addressId;

    /**
     * 支付类型，1支付宝
     */
    @TableField(value = "pay_type")
    private Integer payType;

    /**
     * 订单状态
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 支付金额
     */
    @TableField(value = "pay_price")
    private BigDecimal payPrice;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 支付时间
     */
    @TableField(value = "pay_time")
    private LocalDateTime payTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    /**
     * 删除标识
     */
    @TableField(value = "is_delete")
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}